package grafica;

import java.awt.Graphics;

public class Energia1 extends EnergiaGrafica {

	public Energia1(int x, int y, int width, int height, int energia) {
		super(x, y, width, height, energia);
	}

	@Override
	protected void disegnaBordo(Graphics g) {
		g.drawRect(getX(), getY() + getHeight() - 1, getWidth(), getHeight());
	}

	@Override
	protected void disegnaRiempimento(Graphics g) {
		g.fillRect(getX() + 1, getY() + getHeight(), (getWidth() - 1)
				* getEnergia() / getMaxEnergia(), getHeight() - 1);
	}

}
